<!-- 待处理 已处理 流程办理信息 -->
<template>
	<view class="reportDetails">
		<view class="DetailsBox">
			<u-steps :current="currentStep" dot inactiveColor="#FFFFFF" direction="column">
				<u-steps-item v-for="(item, index) in formcolumns" :key="index">
					<view class="boxIcon" slot="icon">
						<!-- 	<view id="circle_bot">
						</view> -->
						<image class="img" src="@/static/circle.png" mode=""></image>
					</view>
					<view class="descBox" slot="desc">
						<view class="stepTitle">
							<view class="titText">{{ item.instname }}</view>
							<view class="time">
								{{ item.time }}
							</view>
						</view>
						<view class="desc">
							<view class="item_row">
								<view class="name">
									{{ item.username }}
								</view>
								<!-- <view class="time">
									{{ item.time }}
								</view> -->
							</view>
							<view class="adviceLabel">
								<view>{{ item.taskname }}</view>
								<view v-if="item.type">：</view>
								<view class="advice">{{ item.type }}</view>
							</view>
							<view class="content">
								{{ item.message }}
							</view>
						</view>
					</view>
				</u-steps-item>
			</u-steps>
		</view>
	</view>
</template>

<script>
	import {
		queryComment
	} from '@/common/api/approve/workflow/mf_MyTasjUndo.js'
	export default {
		name: 'uniFlowRecord',
		props: {
			processinstanceid: {
				type: String,
				require: true
			},
		},
		data() {
			return {
				// 表单审批记录
				formcolumns: [],
				// 当前处于哪步
				currentStep: 0
			};
		},
		created() {
			this.getProcessingRecord()
		},
		methods: {
			async getProcessingRecord() {
				let params = {
					processinstanceid: this.processinstanceid,
				}
				let res = await queryComment(params)
				if (res.code == 0) {
					this.formcolumns = res.data || []
					this.currentStep = res.data.length
				}
			}
		}
	};
</script>

<style lang="scss" scoped>
	@import '@/static/css/flex.scss';

	/deep/ .u-steps-item__line {
		height: 100% !important;
	}

	/deep/ .u-steps-item__line--column {
		height: 100% !important;
	}

	page {
		background-color: #fff;
	}

	.reportDetails {
		width: 100%;
		min-height: calc(100vh - 32px);
		background-color: #FFF;
		padding: 1.8rem 1.2rem 0.8rem 1.2rem;
		box-sizing: border-box;

		.DetailsBox {
			width: 100%;
			height: 100%;
			box-sizing: border-box;

			.boxIcon {
				// #circle_bot {
				// 	background-color: #3496FB;
				// 	width: 1rem;
				// 	height: 1rem;
				// 	margin: 0px 0 0 0px;
				// 	border-radius: 50%;
				// }

				.img {
					width: 1rem;
					height: 1rem;
				}
			}

			.descBox {
				width: 100%;
				margin-bottom: 1.25rem;
				margin-left: 0.3rem;

				.stepTitle {
					width: 100%;
					padding-left: 0.8rem;
					display: flex;
					justify-content: space-between;
					box-sizing: border-box;
					align-items: center;

					.titText {
						font-size: 1rem;
						font-family: PingFang SC;
						font-weight: bold;
						color: #1F1F1F;
						line-height: 1rem;
					}

					.time {
						color: #64676c;
					}
				}

				.desc {
					width: calc(100% - 2rem);
					height: 7.4rem;
					background: #F5F5F5;
					border-radius: 0.8rem;
					margin-top: 0.8rem;
					padding: 1rem 1rem;

					.item_row {
						font-size: 29rpx;
						display: flex;
						justify-content: space-between;
						align-items: center;
						margin: 0rem 1rem;

						.name {

							font-size: 1rem;
							font-family: PingFang SC;
							font-weight: bold;
							color: #1F1F1F;
						}


					}

					.adviceLabel {
						margin: 1rem 1rem;
						font-size: 29rpx;
						font-family: PingFang SC;
						font-weight: bold;
						color: #929699;
						line-height: 1rem;
						opacity: 0.65;

						display: flex;
						flex-direction: row;
						align-content: center;

						.advice {
							// font-size: 1rem;
							font-family: PingFang SC;
							font-weight: 500;
							color: #00B853;
							line-height: 1rem;
						}
					}

					.content {
						width: 90%;
						margin: 1rem 1rem;
						font-size: 28rpx;
						font-family: PingFang SC;
						font-weight: bold;
						color: #929699;
						line-height: 1rem;
						opacity: 0.65;
						// overflow: hidden;
						// // white-space: normal;
						// text-overflow: ellipsis;
					}

				}
			}
		}
	}
</style>